Global Index
HTML5 JS API Index > Shadow DOM Tutorials & Specs

ShadowRoot

Extends DocumentFragment.

Properties
Element?
activeElement
Represents the currently focused element in the shadow tree.
bool
applyAuthorStyles
Represents the apply-author-styles flag and indicates whether or not the rules in author styles associated with the element's document apply to the shadow tree. If false (default value), the author styles are not applied to the shadow tree. If true, the author styles are applied.
DOMString
innerHTML
represents the markup of ShadowRoot's contents.
bool
resetStyleInheritance
Represents the reset-style-inheritance flag and indicates whether or not the inheritable CSS properties are set to the initial value at the shadow boundary. If false (default value), the properties continue to inherit. If true, the properties are set to initial value.
StyleSheetList
styleSheets
Represents the shadow root style sheets.
Operations
Element?
elementFromPoint(float x, float y)
Returns an element at specified coordinates. Eventually, this needs to be part of CSSOM View Module specification When invoked, it must return result of running the following steps: If context object is not a ShadowRoot instance, throw an InvalidNodeTypeError.If either argument is negative, x is greated than the viewport width excluding the size of a rendered scroll bar (if any), or if y is greated than the viewport height excluding the size of a rendered scroll bar (if any), return null.Let HIT be the element at coordinates x and y in the viewport, determined through hit testingLet TARGETS be the result of running the retargeting algorithm with HIT as its argumentLet TUPLE be the tuple in TARGETS, whose second value is context objectReturn first value of TUPLE.
HTMLElement
getElementById(DOMString elementId)
Must behave exactly like document.getElementById, except scoped to the shadow tree.
NodeList
getElementsByClassName(DOMString tagName)
Must behave exactly like document.getElementsByClassName, except scoped to the shadow tree.
NodeList
getElementsByTagName(DOMString className)
Must behave exactly like document.getElementsByTagName, except scoped to the shadow tree.
NodeList
getElementsByTagNameNS(DOMString? namespace, DOMString localName)
Must behave exactly like document.getElementsByTagNameNS, except scoped to the shadow tree.
Selection?getSelection()
Referenced by
ElementshadowRoot
HTMLShadowElementolderShadowRoot